/**
 * Copyright [2010] Delta Air Lines, Inc. All Rights Reserved Access,
 * Modification, or Use Prohibited Without Express Permission of Delta Air
 * Lines.
 */
package com.delta.rafg.coredata;


import java.util.ArrayList;
import java.util.List;


/**
 * Error.java This Class is carries errors information.
 * @author RAFG Development Team (D9785692)
 */
public class Error extends AObject {

    /**
     * Holds the value of serialVersionUID property.
     */
    private static final long serialVersionUID = 2595047940846068919L;

    /**
     * Holds the value of all property.
     */
    private List<Error> all;

    /**
     * Holds the value of additionalInfo property.
     */
    private String additionalInfo = "";

    /**
     * Holds the value of errorCode property.
     */
    private String errorCode = "";

    /**
     * Holds the value of errorText property.
     */
    private String errorText = "";

    /**
     * Holds the value of reasonCode property.
     */
    private String reasonCode = "";

    /**
     * Holds the value of reasonText property.
     */
    private String reasonText = "";

    /**
     * This method is the access method for the <code>additionalInfo</code>
     * property, which is of type <code>String</code>.
     * @return the current value of the <code>additionalInfo</code> property.
     */
    public String getAdditionalInfo() {

        return additionalInfo;
    }

    /**
     * This method is the access method for the <code>all</code> property, which
     * is of type <code>List<Error></code>.
     * @return the current value of the <code>all</code> property.
     */
    public List<Error> getAll() {

        if (all == null) {
            all = new ArrayList<Error>();
        }
        return all;
    }

    /**
     * This method is the access method for the <code>errorCode</code> property,
     * which is of type <code>String</code>.
     * @return the current value of the <code>errorCode</code> property.
     */
    public String getErrorCode() {

        return errorCode;
    }

    /**
     * This method is the access method for the <code>errorText</code> property,
     * which is of type <code>String</code>.
     * @return the current value of the <code>errorText</code> property.
     */
    public String getErrorText() {

        return errorText;
    }

    /**
     * This method is the access method for the <code>reasonCode</code>
     * property, which is of type <code>String</code>.
     * @return the current value of the <code>reasonCode</code> property.
     */
    public String getReasonCode() {

        return reasonCode;
    }

    /**
     * This method is the access method for the <code>reasonText</code>
     * property, which is of type <code>String</code>.
     * @return the current value of the <code>reasonText</code> property.
     */
    public String getReasonText() {

        return reasonText;
    }

    /**
     * This method sets the value of the <code>additionalInfo</code> property,
     * which is of type <code>String<Error></code>.
     * @param additionalInfo - the new value of <code>additionalInfo</code>
     *            property.
     */
    public void setAdditionalInfo(final String additionalInfo) {

        this.additionalInfo = additionalInfo;
    }

    /**
     * This method sets the value of the <code>all</code> property, which is of
     * type <code>List<Error></code>.
     * @param all - the new value of <code>all</code> property.
     */
    public void setAll(final List<Error> all) {

        this.all = all;
    }

    /**
     * This method sets the value of the <code>errorCode</code> property, which
     * is of type <code>String<Error></code>.
     * @param errorCode - the new value of <code>errorCode</code> property.
     */
    public void setErrorCode(String errorCode) {

        if ("null".equalsIgnoreCase(errorCode)) {
            errorCode = "";
        }
        this.errorCode = errorCode;
    }

    /**
     * This method sets the value of the <code>errorText</code> property, which
     * is of type <code>String</code>.
     * @param errorText - the new value of <code>errorText</code> property.
     */
    public void setErrorText(String errorText) {

        if ("null".equalsIgnoreCase(errorText)) {
            errorText = "";
        }
        this.errorText = errorText;
    }

    /**
     * This method sets the value of the <code>reasonCode</code> property, which
     * is of type <code>String</code>.
     * @param reasonCode - the new value of <code>reasonCode</code> property.
     */
    public void setReasonCode(final String reasonCode) {

        this.reasonCode = reasonCode;
    }

    /**
     * This method sets the value of the <code>reasonText</code> property, which
     * is of type <code>String</code>.
     * @param reasonText - the new value of <code>reasonText</code> property.
     */
    public void setReasonText(final String reasonText) {

        this.reasonText = reasonText;
    }
}
